﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Mediator.Framework.Metadata;
using Mediator.Framework.Runtime.QueryProcessing.Operations;

namespace Mediator.Framework.Runtime.QueryProcessing
{
    public class QueryPlan
    {
        private int nameCount = 0;
        private readonly HashSet<Value> _values = new HashSet<Value>();
        private readonly HashSet<Operation> _operations = new HashSet<Operation>();

        public void AddOperation(Operation operation)
        {
            _operations.Add(operation);
        }
        
        public void AddValue(Value value)
        {
            _values.Add(value);
        }
        
        public string GetValueName(String userValue)
        {
            return  string.Format("{0}#{1}", String.IsNullOrEmpty(userValue) ? "value" : userValue, ++nameCount);
        }
    }
}
